﻿@model MyAspNetCoreTodo.Models.LoginViewModel

<h2>Login</h2>
<form asp-action="Login" method="post">
    @Html.AntiForgeryToken() <!-- 添加防伪令牌 -->
    <div>
        <label asp-for="Email"></label>
        <input asp-for="Email" />
        <span asp-validation-for="Email" class="text-danger"></span>
    </div>
    <div>
        <label asp-for="Password"></label>
        <input asp-for="Password" type="password" />
        <span asp-validation-for="Password" class="text-danger"></span>
    </div>
    <button type="submit">Login</button>
</form>
<div>
    <p>Don't have an account? <a asp-action="Register" asp-controller="Account">在此注册</a>.</p>
</div>